<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('', 'HomeController@index');  //主页

    $router->resource('sm/school', SchoolController::class);  //学校资源控制器
    $router->resource('sm/semester', SemesterController::class);  //学期资源控制器
    $router->resource('sm/teacher', TeacherManagementController::class);  //教师资源控制器
    $router->resource('sm/student', StudentManagementController::class);  //学生资源控制器
    $router->resource('sm/major', MajorController::class);  //专业资源控制器
    $router->resource('sm/class', GradeController::class);  //班级资源控制器


    $router->resource('ta/score', ScoreController::class);  //成绩管理资源控制器
    $router->resource('ta/course', CourseController::class);  //课程资源控制器
    $router->resource('ta/arrange', ClassCourseController::class);  //课程安排资源控制器

    $router->resource('is/veidoo', VeidooController::class);  //维度资源控制器
    $router->resource('is/element', ElementController::class);  //要素资源控制器
    $router->resource('is/veidoogrades', VeidooGradesController::class);  //维度等级资源控制器
    $router->resource('is/panel', PanelController::class);  //评价小组资源控制器


    $router->resource('tm/profile', TeacherDetailController::class);  //教师个人资源控制器
    $router->resource('tm/grade', TeacherGradeController::class);  //教师班级控制器
    $router->resource('tm/course', TeacherCourseController::class);  //教师课程控制器
    $router->resource('tm/insert', TeacherInsertScoreController::class);  //教师录入成绩控制器
    $router->get('tm/insertstudent','TeacherInsertScoreController@InsertStudent'); //插入学生分数表单
    $router->get('tm/insertstudentsuccesss','TeacherInsertScoreController@insertStudentSuccesss');//处理学生分数

    $router->resource('ms/profile', StudentDetailController::class);  //学生个人资源控制器
    $router->resource('ms/score', StudentScoreController::class);  //学生个人资源
    $router->get('ms/cqe', 'StudentCQEController@result');  //学生综合素质控制器

    $router->get('sm/student/{id}/api/class','SelectLoadDataController@classData'); //专业班级联动
    $router->get('sm/student/api/class','SelectLoadDataController@classData'); //专业班级联动

    $router->get('is/panel/{id}/api/student','SelectLoadDataController@studentDate'); //专业班级联动
    $router->get('is/panel/api/student','SelectLoadDataController@studentDate'); //专业班级联动
    $router->get('is/panel/api/schoolmate','SelectLoadDataController@schoolmateDate'); //专业班级联动

    $router->resource('cqe/teacher', TeacherCQEController::class);  //综合素质教师控制器
    $router->resource('cqe/group', GroupCQEController::class);  //综合素质小组控制器
    $router->resource('cqe/me', StudentCQEController::class);  //综合素质学生控制器
    $router->resource('cqe/list', ListCQEController::class);  //综合素质结果控制器

    $router->get('cqe/detail','CQETableController@table'); //综合素质评价
    $router->post('cqe/handleCQE','CQETableController@handle'); //处理综合素质评价
    $router->get('cqe/result','CQETableController@result'); //处理综合素质评价


});
